using System;
using System.Collections.Generic;


namespace Gfw.Models.Stock
{
    [Serializable]
    public partial class StkBargainagency : IEquatable<StkBargainagency>
    {

        #region Private Members

        private string _id;
        private string _userid;
        private int _tradetype;
        private decimal _agencyprice;
        private decimal _agencycount;
        private DateTime? _agencydate;
        private decimal _tradeprice;
        private decimal _tradecount;
        private DateTime? _tradedate;
        private decimal _tradetotal;
        private int _tradestatus;
        private int _accounttype;
        private int _forcetradetype;
        #endregion

        #region Constructor

        public StkBargainagency()
        {
            _id = String.Empty;
            _userid = String.Empty;
            _tradetype = 0;
            _agencyprice = 0;
            _agencycount = 0;
            _agencydate = null;
            _tradeprice = 0;
            _tradecount = 0;
            _tradedate = null;
            _tradetotal = 0;
            _tradestatus = 0;
            _accounttype = 0;
            _forcetradetype = 0;
        }
        #endregion // End of Default ( Empty ) Class Constuctor

        #region Public Properties

        public virtual string Id
        {
            get
            {
                return _id;
            }

            set
            {
                if (value == null)
                    throw new ArgumentOutOfRangeException("Null value not allowed for Id", value, "null");

                if (value.Length > 40)
                    throw new ArgumentOutOfRangeException("Invalid value for Id", value, value.ToString());

                _id = value;
            }
        }

        public virtual string Userid
        {
            get
            {
                return _userid;
            }

            set
            {
                if (value == null)
                    throw new ArgumentOutOfRangeException("Null value not allowed for Userid", value, "null");

                if (value.Length > 40)
                    throw new ArgumentOutOfRangeException("Invalid value for Userid", value, value.ToString());

                _userid = value;
            }
        }

        public virtual int TradeType
        {
            get
            {
                return _tradetype;
            }
            set
            {
                _tradetype = value;
            }

        }

        public virtual decimal AgencyPrice
        {
            get
            {
                return _agencyprice;
            }
            set
            {
                _agencyprice = value;
            }

        }

        public virtual decimal AgencyCount
        {
            get
            {
                return _agencycount;
            }
            set
            {
                _agencycount = value;
            }

        }

        public virtual DateTime? AgencyDate
        {
            get
            {
                return _agencydate;
            }
            set
            {
                _agencydate = value;
            }

        }

        public virtual decimal TradePrice
        {
            get
            {
                return _tradeprice;
            }
            set
            {
                _tradeprice = value;
            }

        }

        public virtual decimal TradeCount
        {
            get
            {
                return _tradecount;
            }
            set
            {
                _tradecount = value;
            }

        }

        public virtual DateTime? TradeDate
        {
            get
            {
                return _tradedate;
            }
            set
            {
                _tradedate = value;
            }

        }

        public virtual decimal TradeTotal
        {
            get
            {
                return _tradetotal;
            }
            set
            {
                _tradetotal = value;
            }

        }

        public virtual int TradeStatus
        {
            get
            {
                return _tradestatus;
            }
            set
            {
                _tradestatus = value;
            }

        }

        public virtual int AccountType
        {
            get
            {
                return _accounttype;
            }
            set
            {
                _accounttype = value;
            }

        }
        public virtual int ForceTradeType
        {
            get
            {
                return _forcetradetype;
            }
            set
            {
                _forcetradetype = value;
            }

        }


        #endregion

        #region Public Functions

        #endregion //Public Functions

        #region IEquatable members

        public virtual bool Equals(StkBargainagency other)
        {
            if (other == this)
                return true;

            return (other != null) &&
                (this._id == other.Id);

        }

        #endregion

    }
}
